-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tailwind nesting does not work #9526
Comments
I'm aware of #6202, but the suggested workaround of changing the file extension did not work. I also tried a variety of configurations with a custom |
I'm able to get it to work with this config: import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import tailwindcssNesting from 'tailwindcss/nesting'
// https://astro.build/config
export default defineConfig({
integrations: [tailwind({ applyBaseStyles: false })],
vite: {
css: {
postcss: {
plugins: [tailwindcssNesting()]
}
}
}
}) You don't need to initialize the tailwindcss postcss plugin as
|
Thank you so much for the quick response! That vite configuration works for me too. I agree, the integration should probably handle this. You could maybe have it on by default since the syntax it enables is just a superset of the regular syntax AFAIK. In that case it would not be a breaking change. |
It worked for me but setting applyBaseStyles to true. import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import tailwindcssNesting from 'tailwindcss/nesting'
import robotsTxt from "astro-robots-txt"
// https://astro.build/config
export default defineConfig({
integrations: [
tailwind({ applyBaseStyles: true }),
robotsTxt()
],
vite: {
css: {
postcss: {
plugins: [tailwindcssNesting()]
}
}
},
site: 'https://Sergi0Martin.github.io',
}) |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
What's the expected result?
Link to Minimal Reproducible Example
https://github.com/dctalbot/astro-repro-issue-9526
Participation
The text was updated successfully, but these errors were encountered: